<%@ page import="cn.java71.entity.Student" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2021/2/22
  Time: 16:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setAttribute("msg","page:今天是2-22");
    session.setAttribute("msg","sesion :今天是2-22");
    application.setAttribute("msg","application:今天是2-22");
    String []ar={"苹果","梨子","香蕉"};
    pageContext.setAttribute("fruit",ar);
    Student student=new Student();
    student.setSname("拉欧我");
    request.setAttribute("stu",student);
%>

<h1>
    今天是:${ms.ff.fss.ddd}
</h1>
<h1>
    ${msg}
</h1>
<hr/>
<h1>
    ${stu.sname}
</h1>
<h1 style="color:red;">${fruit[0]}</h1>
<h2>
    data in session:${sessionScope.msg}
</h2>
<hr size="50" color="red"/>
<%
    String str="<h1>We change lives!</h1>";
    request.setAttribute("str",str);
%>

<c:out value="${str}" />
<c:out value="${nns}" default="这个没有" />
${str}
<c:set var="exam" value="100"/>
<br/>
<h1>${exam}</h1>
<hr/>
<c:forEach items="${fruit}" var="f" varStatus="s">
    <p style="background-color: aqua">${s.count} :${f}</p>
</c:forEach>
</body>
</html>
